FROM openjdk:8
ENV TZ=Asia/Shanghai
ENV HOST_IP=172.16.6.162
# 作者
MAINTAINER lee
# VOLUME 指定临时文件目录为/tmp，在主机/var/lib/docker目录下创建了一个临时文件并链接到容器的/tmp
VOLUME /tmp
VOLUME /genenis/oss/files
# 将jar包添加到容器中并更名为zzyy_docker.jar
ADD ../target/service_oss-1.0-SNAPSHOT.jar service_oss.jar
# 运行jar包
RUN bash -c 'touch /service_oss.jar'
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && genenis $TZ > /etc/timezone
ENTRYPOINT ["java","-jar","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=18203","-Xmx256m","/service_oss.jar","--spring.profiles.active=test"]
#暴露8250端口作为微服务
EXPOSE 8203
EXPOSE 18203